from dataclasses import dataclass
from typing import NamedTuple, Union, Optional

from httpserverutil.jsonpat.typescript_presentation import to_typescript_plain_text


T1 = NamedTuple("Haha", a=str, b=float)

@dataclass
class T2:
    a: int
    b: Optional[int]
    c: Union[int, T1]


def testing_typescript_presentaion():
    print(to_typescript_plain_text(T2))